//
//  main.c
//  结构数组的使用
//
//  Created by apple on 2016/12/19.
//  Copyright © 2016年 apple. All rights reserved.
//

#include <stdio.h>
#define N 3

int main(){
    int i;
    struct StudentType {
        int num;
        char*name;
        char sex[3];
        int age;
        float score;
    };
    struct StudentType student[N]={
        {10101,"德华刘","男",42,98.1},
        {10102,"靓颖张","女",22,99.8},
        {10103,"学友张","男",43,96.5}
    };
    for (i=0; i<N; i++) {
        printf("%8d",student[i].num);
        printf("%12s",student[i].name);
        printf("%6s",student[i].sex);
        printf("%6d",student[i].age);
        printf("%8.1f\n",student[i].score);
    }
    return 0;
}
